<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
    export default {
      name: 'App',
      components: {
      },
      created:function () {
          var deviceWidth = document.documentElement.clientWidth;
          /*刷新页面时，如果有token就不跳转页面*/
          if(sessionStorage["user_login_token"]&&JSON.parse(sessionStorage["user_login_token"])){
            return;
          }
          if(deviceWidth>1200){
              this.$router.push({path: '/login'});
          }else if(deviceWidth>800){
              this.$router.push({path: '/ipad/login'});
          }else{
              this.$router.push({path: '/mobileLogin'});
          }
      }
    }
</script>

<style>

</style>
